//
//  SXVideoDetailModel.m
//  ShiXun
//
//  Created by lanou on 15/10/26.
//  Copyright © 2015年 张琪. All rights reserved.
//

#import "SXVideoDetailModel.h"

@implementation SXVideoDetailModel

- (void)setValue:(id)value forKey:(NSString *)key
{
    if ([key isEqualToString:@"consumption"]){
        self.shareCount = value[@"shareCount"];
    }
    else if ([key isEqualToString:@"description"]){
        self.descriptionInfo = value;
    }
    else if ([key isEqualToString:@"duration"]){
        NSInteger timeNum = [(NSNumber *)value integerValue];
        self.durationTime = [NSString stringWithFormat:@"%ld'%ld", timeNum / 60, timeNum % 60];
    }
    else{
        [super setValue:value forKey:key];
    }
}

@end
